import axios from '../utils/http'

//----------------------------------------------
// 任务分类 列表
export const makeTaskClassifyList = (params) =>
    axios({
        url: '/v1/manager/classify/task',
        method: 'get',
        params
    })


// 任务分类 添加
export const makeTaskClassifyListAdd = (data) =>
    axios({
        url: '/v1/manager/classify/task',
        method: 'post',
        data
    })


// 任务分类 删除
export const makeTaskClassifyListDelete = (params) =>
    axios({
        url: `/v1/manager/classify/task/${params}`,
        method: 'delete',
    })

//------------------------------------------

// 任务列表
export const makeTaskList = (params) =>
    axios({
        url: '/v1/manager/task',
        method: 'get',
        params
    })

// 任务列表 详情
export const makeTaskListId = (params) =>
    axios({
        url: `/v1/manager/task/${params}`,
        method: 'get',
    })

// 任务列表 添加
export const makeTaskListAdd = (data) =>
    axios({
        url: '/v1/manager/task',
        method: 'post',
        data
    })

// 任务列表 置顶与取消置顶
export const makeTaskListIdPut = (params) =>
    axios({
        url: `/v1/manager/task/${params}`,
        method: 'put',
    })

// 任务列表 上下架
export const makeTaskStatusListIdPut = (params) =>
    axios({
        url: `/v1/manager/status/task/${params}`,
        method: 'put',
    })

// 任务列表 删除
export const makeTaskStatusListIdDelete = (params) =>
    axios({
        url: `/v1/manager/task/${params}`,
        method: 'delete',
    })

// 任务列表 浏览记录
export const makeTaskListBrowse = (params) =>
    axios({
        url: '/v1/manager/browse/task',
        method: 'get',
        params
    })

// 任务列表 参与记录
export const makeTaskListParticipation = (params) =>
    axios({
        url: '/v1/manager/user/join/task',
        method: 'get',
        params
    })
//---------
// 任务审核 列表
export const makeTaskauditList = (params) =>
    axios({
        url: '/v1/manager/user/audit/task',
        method: 'get',
        params
    })

// 任务审核 详情
export const makeTaskauditListId = (params) =>
    axios({
        url: `/v1/manager/user/audit/task/${params}`,
        method: 'get',
    })

// 任务审核 添加
export const makeTaskauditListAdd = (data) =>
    axios({
        url: '/v1/manager/user/audit/task',
        method: 'post',
        data
    })